package com.dongdongshop.api;

import com.dongdongshop.data.Result;
import com.dongdongshop.dto.ItemDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("dongdongshop-goods-service")
public interface GoodsServiceApi {
    @GetMapping("/item")
    Result<ItemDTO> getItemById(@RequestParam Long itemId);

    //批量修改库存
    @PostMapping("/item")
    Result<ItemDTO> updateByNum(@RequestBody List<ItemDTO> itemVOList);
}
